package com.ssm.controller;

import com.ssm.service.UserService;
import com.ssm.util.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:随缘而愈
 * @date 27/10/2023 上午10:59
 * @description:必出BUG
 * @params
 * @return
*/
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/list")
    public ResultData list(){
        ResultData data = userService.findAll();
        return ResultData.ok(data, data.getCount(), data.getPageSize(), data.getPages());
    }


}
